package com.heima.user.feign;


import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.common.pojos.ApAuthor;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("leadnews-article")
public interface ApAuthorFeign {
    //远程调用方法
    //创建作者和查询作者

    @GetMapping("/api/v1/author/findByUserId/{userId}")
    public ApAuthor findApAuthorById(@PathVariable("userId") Integer userId);


    @PostMapping("/api/v1/author/save")
    public ResponseResult save(@RequestBody ApAuthor apAuthor);
}
